/**
 * 
 */
var COURSE_PAGE_SIZE=5;

var QUIZ_PAGE_SIZE=10;

function stu(n,count){
        for(var i=1;i<=count;i++){
                if (i==n){                        
					  document.getElementById('notcon0'+i).style.display='block';					
                        }
                else {
					 document.getElementById('notcon0'+i).style.display='none';
                        }
        }
}

function litab(m,cou){
        for(var i=1;i<=cou;i++){
                if (i==m){                        
                      document.getElementById("a"+i).style.color="white";
					  document.getElementById("a"+i).style.backgroundColor="#159E6B";	
					  document.getElementById('tab'+i).style.display='block';					
                        }
                else {
					 document.getElementById("a"+i).style.color="black";
					 document.getElementById("a"+i).style.backgroundColor="#F7F7F7";	
                     document.getElementById('tab'+i).style.display='none';
                        }
        }
}


function hometab(m,cou){
        for(var i=1;i<=cou;i++){
                if (i==m){                        
                      document.getElementById("b"+i).style.color="white";
					  document.getElementById("b"+i).style.backgroundImage="url(../images/kczx_son/tabs01.jpg)";	
					  document.getElementById('tab'+i).style.display='block';					
                        }
                else {
					 document.getElementById("b"+i).style.color="black";
					 document.getElementById("b"+i).style.backgroundImage="none";	
                     document.getElementById('tab'+i).style.display='none';
                        }
        }
}



function cotab(j,numb){
        for(var i=1;i<=numb;i++){
                if (i==j){                        
                      document.getElementById("co"+i).style.backgroundColor="#EEE";
					  document.getElementById("co01"+i).style.backgroundImage="url(../images/grzx_images/ksxx.jpg)";						
                        }
                else {
                     document.getElementById("co"+i).style.background="#FFF";
					 document.getElementById("co01"+i).style.backgroundImage="none";      
                        }
        }
}



function outtt(a,numbb){
        for(var i=1;i<=numbb;i++){
                if (i==a){                        
                      document.getElementById("co"+i).style.backgroundColor="#FFF";
					  document.getElementById("co01"+i).style.backgroundImage="none";						
                  }
        }
}

               
 function cl(){ 
	 document.getElementById("div005").style.display="none";			
 }


function tab300(b,cou){
        for(var i=1;i<=cou;i++){
                if (i==b){                        
                      document.getElementById("tab030"+i).style.backgroundColor="white";
					  document.getElementById("tab030"+i).style.border="1px solid #FFF";	
					  document.getElementById('tab300'+i).style.display='block';					
                        }
                else {
					 document.getElementById("tab030"+i).style.backgroundColor="#E2EFFC";
					 document.getElementById("tab030"+i).style.border="1px solid #E2EFFC";	
                     document.getElementById('tab300'+i).style.display='none';
                        }
        }
}


 function addnote(){ 
			   document.getElementById("addnote").style.display="block";
			 			
               }

 function note(){ 
			   document.getElementById("addnote").style.display="none";
			  			
               }
 

 function cla(){ 
			   document.getElementById("checkclass").style.display="none";			
               }

 //定义当前班级成员列表的页数
 var pageno_classMembers = 1;
 //定义当前班级成员列表每页显示的条目数
 var pagesize_classMembers = 3;
 var pagecount_classMembers  = 0;
 
 function refreshpager_classMembers()
 {
	 $('#selectPage').html("");
	for(var i=0;i<pagecount_classMembers;i++){
		if(i == pageno_classMembers-1)	{
			$('#selectPage').append("<option value='"+(i+1)+"' selected> 第"+(i+1)+"页 </option>");
	}
		else			{
			 $('#selectPage').append("<option value='"+(i+1)+"'> 第"+(i+1)+"页 </option>");
			}
    }
 }
 //下拉选择翻页
 function selectpage(val)
 {
if(pageno_classMembers ==val)
	{
	return;
	}
	 pageno_classMembers = val;
	 clopen(curclaid);		 
 }
 function gopage(change)
 { 
	 if (change == "first"){
		 if(pageno_classMembers== 1) {
			 alert("当前已经是第一页！");
			 return ;
			 }
		 pageno_classMembers = 1;
		 clopen(curclaid);
	}
	 else if(change == "pre")	{
		 if(pageno_classMembers == 1) {
			 alert("当前已经是第一页！");
			 return;
			 }
		 pageno_classMembers = pageno_classMembers-1;
		 clopen(curclaid);
	 }
	 else if(change == "next"){		 
		 if(pageno_classMembers == pagecount_classMembers) {
			 alert("当前已经是最后一页！");
			 return;
			 }
		 pageno_classMembers = pageno_classMembers+1;
		 clopen(curclaid);		 
    }
		 
 }
 
 
 
 
 
 
 
 
 
 
 


 /****
  * 
  * 简单的ajax方法
  */
 var  AjaxTool = function(method,actionurl,datas,returnType,successcall){
 	
 	$.ajax({
 	    type: method,
 	    async: false,
 	    url: actionurl,
 	    dataType:returnType,
 	    headers: {
 	          "Accept" : "text/plain; charset=utf-8",
 	          "Content-Type": "application/json; charset=utf-8"
 	      },
 	    contentType: "application/json;charset=UTF-8",
 	    data:datas ,
 	    success:successcall
 	});
 	
 };

/**
 * 
 */
 var  AjaxToolNoEncode = function(method,actionurl,datas,returnType,successcall){
 	
 	$.ajax({
 	    type: method,
 	    async: false,
 	    url: actionurl,
 	    dataType:returnType,
 	    
 	    data:datas ,
 	    success:successcall
 	});
 	
 };
 
 